#include "ThreadPool.hpp"
#include <iostream>
#include <unistd.h>
#include <time.h>
using namespace std;
using namespace threadpool;

int main()
{
    ThreadPool<int> *tp = ThreadPool<int>::GetDistance();
    tp->InitThreadPool();
    // 随机数种子
    srand((long long)time(nullptr));
    while (true)
    {
        int a = rand() % 20;
        tp->Push(a);
        cout << "发送的数据为" << a << endl;
        sleep(1);
    }

    return 0;
}
